import axios from 'axios'
// import { withRouter} from 'react-router-dom'
//拦截请求
axios.interceptors.request.use(function(config){
  return config
})

//拦截响应
axios.interceptors.response.use(function(config){
  console.log(config)
  if(config.data.errorCode==='000014'||config.data.errorCode==='000013'){
  
    window.location.href='/err'
    return new Promise(() => {})
  }else{
    return config
  }
  
})